﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section1
{
    public class Example09
    {
        public Example09()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            V.Point p = new V.Point(3);
            p[0] = -2.0;
            p[1] = -1.0;

            V.Point q = new V.Point(3);
            q[0] = -3.0;
            q[1] = -3.0;

            V.Point r = new V.Point(3);
            r[0] = -1.0;
            r[1] = -4.0;


            V.Vector v = new V.Vector(p, q);
            V.Vector w = new V.Vector(q, r);
            V.Vector u = new V.Vector(r, p);

            V.Vector v3 = v + w + u;

            result += v3[0].ToString() + "   " +
                v3[1].ToString() + "   " + v3[2].ToString() + "\r\n";
         }
    }
}

// 0   0   0
